package day6;

import day4.teacher.MathTeacher;
import day4.teacher.PETeacher;
import day4.teacher.Teacher;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class CollectionsTest {
    public static void main(String[] args) {
        //Arrays :操作数组
        //Collections:List
        int []a={1,25,6,3,15,14,23};
        System.out.println(Arrays.toString(a));
        Arrays.sort(a);
        System.out.println(Arrays.toString(a));
        Arrays.fill(a,45);
        System.out.println(Arrays.toString(a));
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>");
        List<Teacher> l2=new ArrayList<>();
        l2.add(new MathTeacher("小黄",24));
        l2.add(new MathTeacher("老黄",44));
        l2.add(new PETeacher("小张",23));

        Collections.sort(l2);
        System.out.println("比较后：");
        for(Teacher t:l2){
            System.out.println(t);
        }
        // Collections.min()
    }
}
